package scf.demo.controller;

import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import scf.demo.dto.PayApplyDTO;
import scf.demo.dto.Response;
import scf.demo.feign.DemoFeign;

/**
 * @author Harry Lee
 * @since 2025/9/22 15:30
 */
@RestController
@RequiredArgsConstructor
@Slf4j
public class DemoController {

    private final DemoFeign bizIoFeign;

    @PostMapping("/pay/apply")
    public Response<String> payApply(@RequestBody @Valid PayApplyDTO payApplyDTO) {
        return bizIoFeign.payApply("scf-hcj", payApplyDTO);
    }

}